package mc

import (
	"gitee.com/dreamwood/ez-go/db/mgo"
)

const (
	GradeEventNew          = "study.GradeNew"
	GradeEventBeforeCreate = "study.GradeBeforeCreate"
	GradeEventBeforeUpdate = "study.GradeBeforeUpdate"
	GradeEventBeforeSave   = "study.GradeBeforeCreate study.GradeBeforeUpdate"
	GradeEventAfterCreate  = "study.GradeAfterCreate"
	GradeEventAfterUpdate  = "study.GradeAfterUpdate"
	GradeEventAfterSave    = "study.GradeAfterCreate study.GradeAfterUpdate"
	GradeEventDelete       = "study.GradeDelete"

	GradeAccessControlEvent = "study.GradeAccessControl"
)

func GetGradeConfig() *mgo.DocConfig {
	return Grade_Config
}

var Grade_Config *mgo.DocConfig

func init() {
	Grade_Config = NewGradeConfig()
}

func NewGradeConfig() *mgo.DocConfig {
	return &mgo.DocConfig{
		ContainerKey: "study.Grade",
		Fields: []string{
			"name",
		},
		RelationFields:  []string{},
		RelationConfigs: map[string]*mgo.DocRelation{},
		FieldFilter: map[string]*mgo.DocFieldFilter{
			"default": {
				Select: []string{},
				Omit:   []string{},
			},
		},
	}
}
